{extend name="layout/index" /}
{block name="table"}
<table class="table">
	<thead>
		<tr>
			<!--<th>编号</th>-->
			<th>
				{$tables['fields']['username']['name']}
			</th>
			<th>{$tables['fields']['fullname']['name']}</th>
			<th>{$tables['fields']['phone']['name']}</th>
			<th>{$tables['fields']['email']['name']}</th>
			<th>用户组</th>
			<th>{$tables['fields']['status']['name']}</th>
			<th>操作</th>
		</tr>
	</thead>
	<tbody>

	{foreach $lists as $key=>$vo } 
	<tr>
		<!--<td>{$vo.id}</td>-->
		<td>{$vo.username}</td>
		<td>{$vo.fullname}</td>
		<td>{$vo.phone}</td>
		<td>{$vo.email}</td>
		<td>
			{if !empty($vo.groups)}
			{foreach $vo['groups'] as $k=>$v } 
			<span class="badge badge-pill badge-primary">
				{$v['title']}
			</span>
			{/foreach}
			{/if}
		</td>
		<td>{$vo.status}</td>
		<td >
			{if checkurl($now_route['controller'].'/read')}
			<a href="{:url('read',array('id'=>$vo['id']))}" title="浏览"><i class="fa fa-lg fa-fw fa-eye"></i></a>
			{/if}
			{if checkurl($now_route['controller'].'/edit')}
			<a href="{:url('edit',array('id'=>$vo['id']))}" title="修改"><i class="fa fa-lg fa-fw fa-edit"></i></a>
			{/if}
			{if checkurl($now_route['controller'].'/delete')}
			<a href="javascript:;" data-href="{:url('delete',array('id'=>$vo['id']))}" title="删除" class="delete">
				<i class="fa fa-lg fa-fw fa-trash-o"></i>
			</a>
			{/if}
		</td>
	</tr>
	{/foreach}

	</tbody>
</table>
{/block}
